CC = /opt/toolchain-uclibc/usr/bin/arm-linux-gcc
#CC = gcc
CFLAGS = -O2 -Wall -D_REENTRANT -D_XOPEN_SOURCE=600 
LDFLAGS =  -ldb-4.7 -lpthread -L./

OBJS = main.o systime.o sysmonitor.o taskcenter.o powerdown.o datacenter.o innercommu.o innermanage.o upcommu.o upmanage.o comport.o

all: eapp

eapp:$(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
	cp eapp /home/roy/rootfiles/rootfs-V10.0.1/debug/
clean:
	rm -f *.o eapp serial_d
serial_d:comport.o serial_d.o
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ comport.o serial_d.o
	cp serial_d /home/roy/rootfiles/rootfs-V10.0.1/debug/
install:
	cp eapp /home/roy/rootfiles/rootfs-V10.0.1/debug/